package com.dudu.utils;

import com.iflytek.cloud.speech.SpeechError;

/**
 * tts合成的抽象回调类
 * 
 * @author zx
 *
 */
public abstract class AbstractTTSSynthesizeCallback {

	private volatile boolean isDone = false;

	private volatile boolean isOvertime = false;

	private String filePath;

	public String getFilePath() {
		return filePath;
	}

	public void setFilePath(String filePath) {
		this.filePath = filePath;
	}

	public boolean isDone() {
		return isDone;
	}

	public boolean isOvertime() {
		return isOvertime;
	}

	public void done() {
		isDone = true;
	}

	public void overtime() {
		isOvertime = true;
	}

	protected abstract void doAfterTTSSynthesize(String uri);

	protected abstract void doAfterTTSSynthesizeFailture(String uri, SpeechError error);

}
